<div class="block">
	<div class="block-title">Contact Us</div>
	<div class="block-body">
	<?php if(Yii::app()->user->hasFlash('contact')): ?>
	
	<div class="flash-success">
		<?php echo Yii::app()->user->getFlash('contact'); ?>
	</div>
	
	<?php else: ?>
	<div class="form">
	
	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'contact-form',
		'enableClientValidation'=>true,
		'clientOptions'=>array(
			'validateOnSubmit'=>true,
		),
	)); ?>

		<?php echo $form->errorSummary($model); ?>
	
		<div class="row">
			<?php echo $form->labelEx($model,'email'); ?>
			<?php echo $form->textField($model,'email'); ?>
			<?php echo $form->error($model,'email'); ?>
		</div>
	
		<div class="row">
			<?php echo $form->labelEx($model,'body'); ?>
			<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
			<?php echo $form->error($model,'body'); ?>
		</div>
	
		<div class="row buttons">
			<?php echo CHtml::submitButton('Submit'); ?>
		</div>
	
	<?php $this->endWidget(); ?>
	
	</div><!-- form -->
	
	<?php endif; ?>
	</div>
</div>